home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / tcqbsnip.zip / PRINTER.BI < prev    next >
Text File  |  1997-05-04  |  4KB  |  110 lines

  1. ' PRINTER.BI
  2. ' by Tika Carr
  3. ' November 11, 1996
  4. '
  5. ' Donated to the Public Domain
  6. ' No guarantees or warranties are expressed or implied.
  7. '
  8. ' Purpose: Epson Dot Matrix B/W & Color Printer Emulation
  9. '
  10. 'Use these strings to control an Epson dot matrix color or black & white
  11. 'printer. Read the comments for instructions and descriptions.
  12.  
  13. esc$ = CHR$(27)
  14.  
  15. '**** Font Pitch ****
  16. Normal$ = esc$ + "~10"      'Normal
  17. DblH$ = esc$ + "~11"        'Double Height
  18. QuadH$ = esc$ + "~12"       'Quadruple Height
  19. DblW$ = esc$ + "~13"        'Double Width
  20. QuadW$ = esc$ + "~14"       'Quadruple Width
  21. Double$ = esc$ + "~15"      'Double Size
  22. Quad$ = esc$ + "~16"        'Quadruple Size
  23. Subscript$ = esc$ + "S1"    'Subscript (small below-the-line)
  24. Superscript$ = esc$ + "S0"  'Superscript (small above-the-line)
  25. SSModeOff$ = esc$ + "T"     'Turns off Superscript or Subscript Mode
  26.  
  27. '**** Font Type ****
  28. CondOn$ = CHR$(18)          'Condensed Mode On
  29. CondOff$ = CHR$(15)         'Condensed Mode Off
  30. UndlnOn$ = esc$ + "-1"      'Underline Mode On
  31. UndlnOff$ = esc$ + "-0"     'Underline Mode Off
  32. ItalicOn$ = esc$ + "4"      'Italics Mode On
  33. ItalicOff$ = esc$ + "5"     'Italics Mode Off
  34. BoldOn$ = esc$ + "G"        'Bold On
  35. BoldOff$ = esc$ + "H"       'Bold Off
  36. ReverseOn$ = esc$ + "~21"   'Reverse Print (Draft Mode Only)
  37. ReverseOff$ = esc$ + "~20"  'Reverse Print Mode Off
  38. Slash0On$ = esc$ + "~41"    'Print 0s with a slash through them.
  39. Slash0Off$ = esc$ + "~40"   'Print 0s as Os (no slash)
  40.  
  41. '**** NLQ/Draft Font Modes ****
  42. Draft$ = esc$ + "x0"        'Default Draft Mode
  43. Roman$ = esc$ + "k0"        'Roman NLQ Font
  44. SanSerif$ = esc$ + "k1"     'Sans Serif NLQ Font
  45. Courier$ = esc$ + "k2"      'Courier NLQ Font
  46.  
  47. '**** Margin, Justification and Tabs ****
  48. LMargin$ = esc$ + "l"       'Set Left Margin (See NOTES below)
  49. RMargin$ = esc$ + "0"       'Set Right Margin (See NOTES below)
  50. SetTab$ = esc$ + "e" + CHR$(0)  'Set Tab (See NOTES below)
  51. LJustify$ = esc$ + "a0"     'Left Justify (default)
  52. RJustify$ = esc$ + "a2"     'Right Justify
  53. FJustify$ = esc$ + "a3"     'Full Justification
  54. Center$ = esc$ + "a1"       'Center each line
  55.  
  56. '**** Printer Movement Control ****
  57. MoveHead$ = esc$ + "f" + CHR$(0) 'Move Print Head to Right (See NOTES below)
  58. TAB$ = CHR$(9)              'Move print head to next tab stop
  59. CR$ = CHR$(13)              'Carriage Return
  60. LF$ = CHR$(10)              'Line Feed
  61. FF$ = CHR$(12)              'Form Feed
  62. BS$ = CHR$(8)               'Backspace
  63. PgLenLn$ = esc$ + "C" + CHR$(0)     'Set page length in lines (See NOTES)
  64. PgLenIn$ = esc$ + "C"               'Set page length in inches (See NOTES)
  65.  
  66. '** NOTES:
  67. '
  68. 'The commands noted above take a 3rd arguement, to set the amount of
  69. 'spaces to move. For example, to move the print head 10 spaces:
  70. '
  71. 'LPRINT MoveHead$ + STR$(10)
  72.  
  73. '**** Printer Control Codes ****
  74. PrinterOn$ = CHR$(19)       'Allow printer to accept data from computer
  75. PrinterOff$ = CHR$(17)      'Printer ignores data sent from computer
  76. Bell$ = CHR$(7)             'Sound Printer beep (some printers may not have
  77.                             'a speaker, and therefore no sound will be made.
  78. SensorOn$ = esc$ + "9"      'Turn on paper-out sensor
  79. SensorOff$ = esc$ + "8"     'Turn off paper-out sensor
  80.  
  81. '**** Color Selection (AVAILABLE ONLY ON 7-COLOR PRINTERS) ****
  82. Black$ = esc$ + "r0"        'Black (default)
  83. Red$ = esc$ + "r1"
  84. Blue$ = esc$ + "r2"
  85. Purple$ = esc$ + "r3"
  86. Yellow$ = esc$ + "r4"
  87. Orange$ = esc$ + "r5"
  88. Green$ = esc$ + "r6"
  89.  
  90. '**** Country Character Sets ****
  91. 'These let you use special characters in your printing. See your printer
  92. 'manual for more details. If its not found in the manual, then your printer
  93. 'may not support special Country character sets (although most printers
  94. 'do support it).
  95.  
  96. USA$ = esc$ + "R0"
  97. France$ = esc$ + "R1"
  98. Germany$ = esc$ + "R2"
  99. UK$ = esc$ + "R3"
  100. Denmark1$ = esc$ + "R4"
  101. Sweden$ = esc$ + "R5"
  102. Italy$ = esc$ + "R6"
  103. Spain1$ = esc$ + "R7"
  104. Japan$ = esc$ + "R8"
  105. Norway$ = esc$ + "R9"
  106. Denmark2$ = esc$ + "R10"
  107. Spain2$ = esc$ + "R11"
  108. LatAmer$ = esc$ + "R12"
  109.  
  110.